package com.googlecode.grs.mechanism;

/**
 * CenteringWallEvent describes an event, or when the FurthestWall has changed,
 * and provides data regarding which wall is the furthest relative to the bot.
 * 
 * Used by CenteringRangeFinderArray, CenteringRangeFinderListener
 * 
 * @see CenteringRangeFinderArray
 * @see CenteringRangeFinderListener
 * @author Dan
 * 
 */
public class CenteringWallEvent {

	private final CenteringWall newFurthest;

	/**
	 * Called by the centering wall finder array Occurs when the furthest wall
	 * relative to the bot changes
	 * 
	 * @param newFurthest
	 *            furthest <code>CenteringWall</code> that was detected at the
	 *            time of this event
	 */
	public CenteringWallEvent(CenteringWall newFurthest) {
		this.newFurthest = newFurthest;

	}

	/**
	 * 
	 * @return furthest <code>CenteringWall</code> that was detected at the time
	 *         of this event
	 */
	public CenteringWall getFurthest() {
		return newFurthest;
	}

}
